# OpenAPI version identifier - required for OpenAPI 3.0 domains
# (c) Elexon 2022, 2023
#
# MMHS - Data Integration Platform 
# Interfaces
# 
# ----- update -----------------------------------------------------------------------
# April 2023
# Aligned to version 1.1 
#
# ------------------------------------------------------------------------------------
# Change history
# ===================
# 1.4 - August 23   - Include REP900, REP901 
# 1.2 - 19-04-2023  - Move M0 block out of IF-022
# 1.1 - April 2023  - Align with chnages - all interfaces upversioned to 005
# 1.0 - Feb 23      - DAG sign-off
# 0.4 - January 23  - version to align with other source files
# 0.3 - October 22  - Updated lst to List to be consistent for all array structures 
# 0.2 - September 22- Updates following first MHHS Programme review - multiple updates
# 0.1 - August 22   - Sent for first MHHS Programme Review
# ===================
# 

openapi: 3.0.0
info:
  title: Interfaces
  description: All Interface payload descriptions
  version: '1.4'
  

# Dictionary items below:
components:
    
  schemas:

# IF 001 -Change of Supplier
# 

    IF-001-Payload:
      description: IF001 Message
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-001-CommonBlock'

        CustomBlock:
          $ref: '#/components/schemas/IF-001-CustomBlock'

    IF-001-CommonBlock:
      description: MHHS Common Block for IF-001
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-001']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[InitialRegistration]'
                - '[ChangeOfSupplier]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode
                
        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
         $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
#        R0:
#          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-001-CustomBlock:
      description: IF001 Custom data block
      type: object
      properties:
        B013:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B013'
        B002:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B002'
        B003:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B003'
        B004:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B004'
        B005:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B005'
        B006:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B006'
        B022:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B022'
        B023:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B023'
        B024:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B024'
        B025:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B025'
        B026:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B026'
        B027:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B027'
        B029:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B029'
        B030:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B030'
        B031:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B031'
        B032:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B032'
        B035List:
          type: array
          items:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B035'
        B037List:
          type: array
          items:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B037'
      required:
          - B013
          


# IF 002 - Notification to New Supplier of Site Information 
# 25/08/22 - work to do

    IF-002-Payload:
      description: IF002 Message
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-002-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-002-CustomBlock'

    IF-002-CommonBlock:
      description: MHHS Common Block for IF-002
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-002']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[GainMPANInfo]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode

        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
#        R0:
#          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-002-CustomBlock:
      description: IF002 Custom data block
      type: object
      properties:
        B013:
            # CSS Switch ID              
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B013'
        B005:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B005'
        B006:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B006'
        B022:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B022'
        B023:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B023'
        B024:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B024'
        B025:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B025'
        B026:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B026'
        B027:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B027'
        B029:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B029'
        B030:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B030'
        B031:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B031'
        B032:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B032'

        B905List:
          type: array
          items:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B905'

        # B035 and B036 blocks below are repeated for each Related MPAN, if Related MPAN Indicator = Y
        B907List:
          type : array
          items: 
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B907'

        B908List:
          type : array
          items: 
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B908'
        
# IF 003 - Notification of Revserse Migrationand De-Appointment

    IF-003-Payload:
      description: IF-003 Notification of Reverse Migration De-Appointment
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-003-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-003-CustomBlock'

    IF-003-CommonBlock:
      description: MHHS Common Block for IF-033
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-033']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[MSDeAppRM]'
                - '[DSDeAppRM]'
                - '[MSDeAppUpdateRM]'
                - '[DSDeAppUpdateRM]'
                - '[ReverseMigNotification'
          required:
            - interfaceID
            - schemaVersion
            - eventCode


        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
#        R0:
#          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-003-CustomBlock:
      description: IF033 Custom data block
      type: object
      properties:
        B013:
            # CSS Switch ID              
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B013'

        B094:
            # Reverse MIgration Notification  (Mandatory for [MSDeAppRM])                
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B094'

        B008:
            # metering Service De-Appointment Details  (Mandatory for [MSDeAppRM])                  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B008'
        
        B009:
            # Data Service De-Appointment Details  (Mandatory for [DSDeAppRM])                  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B009'
            
        B095:
            # Incoming MOP Details
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B095'

        B096:
            # Incoming DC Details  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B096'

      

# IF 004 - Comms Hub Information

    IF-004-Payload:
      description: IF005 Message
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-004-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-004-CustomBlock'

    IF-004-CommonBlock:
      description: MHHS Common Block for IF-004
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-004']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[CommsHubInfo]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode

        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
#        R0:
#          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-004-CustomBlock:
      description: IF005 Custom data block
      type: object
      properties:
        B093:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B093'        


# INF 005- Metering Service MTD Update to Registration

    IF-005-Payload:
      description: IF005 Message
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-005-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-005-CustomBlock'

    IF-005-CommonBlock:
      description: MHHS Common Block for IF-005
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-005']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[MeterInstall]'
                - '[MeterRemoval]'
                - '[MeterExchange]'
                - '[MeterUpdate]'
                - '[MeterHistoryUpdate]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode
          
        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
#        R0:
#          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-005-CustomBlock:
      description: IF005 Custom data block
      type: object
      properties:
        B906:
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B906'        
        B039:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B039'
        B030:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B030'

# INF 006 - Metering Service MTD Update to Registration
# 25/08/22 ok?

    IF-006-Payload:
      description: IF006 - Metering Service MTD Update to Registration
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-006-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-006-CustomBlock'

    IF-006-CommonBlock:
      description: MHHS Common Block for IF-006
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-006']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[MeterInstall]'
                - '[MeterRemoval]'
                - '[MeterExchange]'
                - '[MeterUpdate]'
                - '[MeterHistoryUpdate]'

        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
        R0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-006-CustomBlock:
      description: IF005 Custom data block
      type: object
      properties:
        B906:
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B906'
  
        B039:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B039'

        B030:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B030'

        B905List:
          type : array
          items:
              #074/075
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B905'          
          


# INF 007 - Change of Energisation Status
# 25/08/22 done

    IF-007-Payload:
      description: IF007 - Change of Energisation Status
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-007-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-007-CustomBlock'

    IF-007-CommonBlock:
      description: MHHS Common Block for IF-007
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-007']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[EnergisationStatusChange]'
                - '[EnergisationStatusFailure]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode

                
        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
#        R0:
#          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-007-CustomBlock:
      description: IF007 Custom data block
      type: object
      properties:
        B025:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B025'
        B040:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B040'

# INF 008 - Registration Service Change of Energisation Status Notification 
# 25/08/66 done

    IF-008-Payload:
      description: IF008 - Registration Service Change of Energisation Status Notification 
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-008-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-008-CustomBlock'

    IF-008-CommonBlock:
      description: MHHS Common Block for IF-008
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-008']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[EnergisationStatusChange]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode

        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
        R0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-008-CustomBlock:
      description: IF008 Custom data block
      type: object
      properties:
        B025:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B025'

# INF 009 - Registration Service CSS De-Registration Notification
# 25/08/22 - done

    IF-009-Payload:
      description: IF009 Registration Service CSS De-Registration Notification 
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-009-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-009-CustomBlock'

    IF-009-CommonBlock:
      description: MHHS Common Block for IF-009
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-009']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[MPANDisconnection]'
                - '[CSSDeRegistration]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode
                
        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
#        R0:
#          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-009-CustomBlock:
      description: IF009 Custom data block
      type: object
      properties:
        B041:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B041'
        B042:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B042'

# INF 013 - Notification of Defaulted UTC Settlement Period Consumption Data
# 25/08/66 queries on B049/B050 blocks
 
    IF-013-Payload:
      description: IF-013 Notification of Defaulted UTC Settlement Period Consumption Data
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-013-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-013-CustomBlock'

    IF-013-CommonBlock:
      description: MHHS Common Block for IF-013
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-013']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[ActivePowerDefaulted]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode

        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
#        R0:
#          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-013-CustomBlock:
      description: IF013 Custom data block
      type: object
      properties:
        B043:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B043'
        B049:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B049'
        B067:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B067'
  
        B920List:
          type : array
          items: 
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B920'
        

# INF 014 - Rejected - UTC Settlement Period Consumption Data
# 25/08/66 needs review - is it an array of B900 blocks?

    IF-014-Payload:
      description: IF-014 Rejected - UTC Settlement Period Consumption Data
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-014-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-014-CustomBlock'

    IF-014-CommonBlock:
      description: MHHS Common Block for IF-014
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-014']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[ActivePowerRejected]'
                - '[ConsumptionOnDeEnergisedMPAN]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode

        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
        R0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-014-CustomBlock:
      description: IF014 Custom data block
      type: object
      properties:
        B044:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B044'
        B067:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B067'
        B900List:
          type : array
          items: 
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B900'


 # INF 015 - Request Historic Consumption Replay (ADV Sites Only)
 # 25/08/22 - ok

    IF-015-Payload:
      description: IF-015 Request Historic Consumption Replay (ADV Sites Only)
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-015-CommonBlock'

#  IF-015 has no custom block
#        CustomBlock:
#          $ref: '#/components/schemas/IF-015-CustomBlock'

    IF-015-CommonBlock:
      description: MHHS Common Block for IF-015
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-015']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[ConsumptionReplay]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode

        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
#        R0:
#          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
          
# INF 016 - UTC Settlement Period Consumption Data - REPLAY
    IF-016-Payload:
      description: IF-016 UTC Settlement Period Consumption Data - REPLAY
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-016-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-016-CustomBlock'

    IF-016-CommonBlock:
      description: MHHS Common Block for IF-016
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-016']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[ConsumptionReplayResult]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode
                   
        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
#        R0:
#          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-016-CustomBlock:
      description: IF016 Custom data block
      type: object
      properties:

        B044:
            # Submitting data service                     
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B044'
        B067:
            # connection type                     
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B067'
              
        B900List:
          description: MQID (B045)
          type : array
          items: 
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B900' 
       
        B921List:
          description: Settlement Day (B046) - block B047 and defaulted data (B048)
          type : array
          items: 
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B921'
          
        
# INF 018 - Notification of Registration Data Item Changes
# 25/08/22 - Need to check IF022/23 list

    IF-018-Payload:
      description: IF-018 Notification of Registration Data Item Changes
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-018-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-018-CustomBlock'

    IF-018-CommonBlock:
      description: MHHS Common Block for IF-018
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-018']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[AddressChg]'
                - '[GSPChg]'
                - '[DomPremInd]'
                - '[DUOSTariffIDChg]'
                - '[EnergyDirection]'
                - '[MUMIndicator]'
                - '[DCCEnrolment]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode

        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'

        
    IF-018-CustomBlock:
      description: IF018 Custom data block
      type: object
      properties:
        B013:
          # CSS Switch ID              
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B013'
        B001:
          # GSP Eff From (Mandatory for Events [AddressChg] & [GSPChg])                    
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B001'
        B022:
          # MPAN Address (Mandatory for Events [AddressChg] & [GSPChg])                    
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B022'
        B023:
          # MPAN Connection Type (Mandatory for Events [ConnectionTypeChg], [EnergyDirection], [MUMIndicator])                    
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B023'
        B024:
          # MPAN Line Loss (Mandatory for [LLFID] & [DUOSTariffIDChg] )                    
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B024'
        B028:
          # Domestic Premise Indicator (Mandatory for Event [DomPremInd])                    
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B028'
        B029:
          # DDC Enrolment (Mandatory for Event [DCCEnrolment])                    
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B029'

# B035/B062/B063 all removed 16/12/2022          

# IF 019 - Manage Meterpoint Relationships

    IF-019-Payload:
      description: IF-019 Manage Meterpoint Relationships
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-019-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-019-CustomBlock'

    IF-019-CommonBlock:
      description: MHHS Common Block for IF-019
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-019']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[LinkedImportExportCreate]'
                - '[LinkedImportExportAdd]'
                - '[LinkedImportExportRemove]'
                - '[RelatedCreate]'
                - '[RelatedAdd]'
                - '[RelatedRemove]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode
   
   
        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M1'

    IF-019-CustomBlock:
      description: IF019 Custom data block
      type: object
      properties:
        B090List:
            type: array
            items:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B090'

        B091:
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B091'
        
# IF 020 - Manage Meterpoint Relationships Response

    IF-020-Payload:
      description: IF-020 Manage Meterpoint Relationships Response
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-020-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-020-CustomBlock'

    IF-020-CommonBlock:
      description: MHHS Common Block for IF-020
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-020']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[LinkedImportExportCreate]'
                - '[LinkedImportExportAdd]'
                - '[LinkedImportExportRemove]'
                - '[RelatedCreate]'
                - '[RelatedAdd]'
                - '[RelatedRemove]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode

        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
# M1 not M0 !
        M1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M1'
        R0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'

    IF-020-CustomBlock:
      description: IF020 Custom data block
      type: object
      properties:
        B090List:
            type: array
            items:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B090'

        B091:
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B091'
      
      
# IF 021 - UTC Settlement Period Consumption Data
# 25/8/66 check array of B900

    IF-021-Payload:
      description: IF-021 UTC Settlement Period Consumption Data
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-021-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-021-CustomBlock'

    IF-021-CommonBlock:
      description: MHHS Common Block for IF-021
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-021']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[ActivePower]'
                - '[ReactivePower]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode


        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
#       R0:
#          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-021-CustomBlock:
      description: IF021 Custom data block
      type: object
      properties:
        B044:
            #    Data Service Information (Mandatory)            
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B044'

        B067:
            #    Connection Type            
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B067'
  
        B900:
        # updated from a list to a single item Aug 2023
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B900'


# IF 022 - Load Shape Period Data
# 25/8/22 ok?

    IF-022-Payload:
      description: IF-022 Load Shape Period Data
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-022-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-022-CustomBlock'

    IF-022-CommonBlock:
      description: MHHS Common Block for IF-022
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-022']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[LSSPeriodData]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode


        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'

        
    IF-022-CustomBlock:
      description: IF022 Custom data block
      type: object
      properties:
        B903List:
          description: Load shape data (periods)
          type : array
          items:                         
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B903'

# IF 023 - Load Shape Total Data
# 25/8/22 

    IF-023-Payload:
      description: IF-023 Load Shape Total Data
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-023-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-023-CustomBlock'

    IF-023-CommonBlock:
      description: MHHS Common Block for IF-023
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-023']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[LSSTotalsData]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode


        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
#        M0:
#          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
#        R0:
#          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-023-CustomBlock:
      description: IF023 Custom data block
      type: object
      properties:
        B912List:
          description: Load shape data (totals)
          type : array
          items:                         
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B912'
            
            
# IF 024 - Supplier Advisory Notification to Data Service
# 25/8/22 - ok

    IF-024-Payload:
      description: IF-024 Supplier Advisory Notification to Data Service

      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-024-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-024-CustomBlock'

    IF-024-CommonBlock:
      description: MHHS Common Block for IF-024
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-024']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[SN-Vacant]'
                - '[SN-NoComms]'
                - '[SN-RemoteEnabled]'
                - '[SN-RemoteDisabled]'
                - '[SN-SupplierAC]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode

        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
#        R0:
#          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-024-CustomBlock:
      description: IF024 Custom data block
      type: object
      properties:

        B057:
            #   Supplier Advisory Notification (Mandatory)                  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B057'

        B069:
            #   Supplier Advisory Notification Meter ID ( Mandatory for SN-RemoteEnabled and SN-RemoteDisabled)                
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B069'
            
        B058:
            # Supplier Nominated Annual Consumption (Mandatory for Event [SN-SupplierAC])                    
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B058'
            
            
            
# IF 025 - Supplier Advisory Notification to Data Service
# 25/8/22 ok
# 22/11/22 added [SSCandProfileClass]

    IF-025-Payload:
      description: IF-025 Supplier Advisory Notification to Data Service

      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-025-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-025-CustomBlock'

    IF-025-CommonBlock:
      description: MHHS Common Block for IF-025
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-025']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[ConsentGranularity]'
                - '[IHDInfo]'
                - '[SMSO]'
#                - '[SSC]'
#                - '[ProfileClass]'
                - '[SSCandProfileClass]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode

                
        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
#        R0:
#          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-025-CustomBlock:
      description: IF025 Custom data block
      type: object
      properties:
        B013:
            # CSS Switch ID              
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B013' 
        B068:
            # MPAN Consent Info (Mandatory for Event [ConsentGranularity]                    
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B068'
        B030:
            #  IHD Info (Mandatory for Event [IHDInfo])                    
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B030'
        B031:
            # SMSO (Mandatory for Event [SMSO])                    
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B031'
        B032:
            # MPAN Legacy Info (Optional - Provided for Traditional Meters only )                  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B032'

            
# IF 026 - Notification of Registration Supplier Data Item Changes
# 25/8/22 ok
# 22/11/22 added [SSCandProfileClass]


    IF-026-Payload:
      description: IF-026 Notification of Registration Supplier Data Item Changes

      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-026-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-026-CustomBlock'

    IF-026-CommonBlock:
      description: MHHS Common Block for IF-026
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-026']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[ConsentGranularity]'
                - '[IHDInfo]'
                - '[SMSO]'
               # - '[SCC]'
               # - '[ProfileClass]'
                - '[SSCandProfileClass]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode

                
        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
        R0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-026-CustomBlock:
      description: IF026 Custom data block
      type: object
      properties:
        B013:
            # CSS Switch ID              
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B013' 
        B068:
            # MPAN Consent Info (Mandatory for Event [ConsentGranularity][DomesticIndicator])                    
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B068'
        B030:
            #  IHD Info (Mandatory for Event [IHDInfo])                    
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B030'
        B031:
            # SMSO (Mandatory for Event [SMSO])                    
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B031'
        B032:
            # MPAN Legacy Info (Optional - Provided for Traditional Meters only )                  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B032'
        

            
# IF 027 - Supplier Consumption Amendment Request
# 25/8/22 ok

    IF-027-Payload:
      description: IF-027 Supplier Consumption Amendment Request
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-027-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-027-CustomBlock'

    IF-027-CommonBlock:
      description: MHHS Common Block for IF-027
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-027']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[ConsumptionAmendment]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode

                
        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
#        R0:
#          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-027-CustomBlock:
      description: IF027 Custom data block
      type: object
      properties:
        B902List:
          description: MQID (B045) Supplier Consumption Ammendment Requests
          type : array
          items:                         
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B902'


# IF-028 Supplier Consumption Ammendment Request Response
# 25/8/22 ok

    IF-028-Payload:
      description: IF-028 Supplier Consumption Ammendment Request Response

      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-028-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-028-CustomBlock'

    IF-028-CommonBlock:
      description: MHHS Common Block for IF-028
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-028']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[ConsumptionAmendment]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode

        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
        R0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-028-CustomBlock:
      description: IF028 Custom data block
      type: object
      properties:
        B902List:
          description: MQID (B045) Supplier Consumption Ammendment Requests
          type : array
          items:                         
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B902'

# IF 031 - Supplier Service Provider Appointment Request
# 25/8/22 ok

    IF-031-Payload:
      description: IF-031 Supplier Service Provider Appointment Request
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-031-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-031-CustomBlock'

    IF-031-CommonBlock:
      description: MHHS Common Block for IF-031
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-031']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[MSApp]'
                - '[DSApp]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode
                
        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
#        R0:
#          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-031-CustomBlock:
      description: IF031 Custom data block
      type: object
      properties:
        B013:
            # CSS Switch ID              
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B013' 
        B070:
            # Proposed Metering Service Details (Mandatory for Event [MSApp])                  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B070'

        B071:
            # Proposed Data Service Details (Mandatory for Event [DSApp])                  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B071'

# IF 032 - Supplier Service Provider Appointment Request Response
# 25/8/22 ok
    IF-032-Payload:
      description: IF-032 Supplier Service Provider Appointment Request Response
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-032-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-032-CustomBlock'

    IF-032-CommonBlock:
      description: MHHS Common Block for IF-032
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-032']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[MSAppInitialResp]'
                - '[DSAppInitialResp]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode
                
        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
        R0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-032-CustomBlock:
      description: IF032 Custom data block
      type: object
      properties:
        B013:
            # CSS Switch ID              
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B013' 
        B070:
            # Proposed Metering Service Details (Mandatory for Event [MSApp])                  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B070'

        B071:
            # Proposed Data Service Details (Mandatory for Event [DSApp])                  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B071'

# IF 033 - Registration Service Request for Service Appointment
# 25/8/22 check arrays

    IF-033-Payload:
      description: IF-033 Registration Service Request for Service Appointment
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-033-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-033-CustomBlock'

    IF-033-CommonBlock:
      description: MHHS Common Block for IF-033
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-033']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[MSAppSPRequest]'
                - '[DSAppSPRequest]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode


        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
#        R0:
#          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-033-CustomBlock:
      description: IF033 Custom data block
      type: object
      properties:
        B012:
            # Service Provider Appointment Requesting Supplier 
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B012'
        B013:
            # CSS Switch ID              
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B013'       
        B070: 
        #Proposed Metering Service Details (Mandatory for Event [MSApp])                    
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B070'
        
        B071: 
        # Proposed Metering Service Details (Mandatory for Event [DSApp])                    
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B071'
        B072: 
        # Incumbent Metering Service (Conditionally Mandatory for [MSApp] Only) Ref Interfaces Notes
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B072'                    
        B022: 
        # MPAN Address (Mandatory)                    
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B022'
        B023: 
        # MPAN Connection Type (Mandatory)                    
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B023'
        B024: 
        # MPAN Line Loss (Mandatory for [ChangeOfSupplier])                    
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B024'
        B025: 
        #  MPAN Energisation Status (Mandatory)                    
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B025'
        B026: 
        #  MPAN Market Segment (Mandatory for [ChangeOfSupplier])                    
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B026'
        B029: 
        #  MPAN Smart Info (Conditionally Mandatory - Required only for Smart Meters)                    
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B029'
            
        B031: 
        #  SMSO Info (Optional)                    
                     
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B031'

        B032: 
        #  MPAN Legacy Info (Optional - Populated only for Traditional Meters)                    
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B032'  

        B905List:
          type : array
          items: 
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B905'
            
        B907List:
          type : array
          items: 
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B907'      

        B908List:
          type : array
          items: 
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B908'

            
# IF 034 - Supplier Service Provider Appointment Request Response
# 25/8/22 - ok

    IF-034-Payload:
      description: IF-034 Supplier Service Provider Appointment Request Response
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-034-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-034-CustomBlock'

    IF-034-CommonBlock:
      description: MHHS Common Block for IF-034
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-034']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[MSAppSPResponse]'
                - '[DSAppSPResponse]'
                - '[SDS-MDRUpdate]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode
        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
#        R0:
#          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-034-CustomBlock:
      description: IF034 Custom data block
      type: object
      properties:
        B007:
            # Proposed Metering Service Details (Mandatory for Event [MSAppSPRepsonse] & [DSAppSPRepsonse])                  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B007'
        B012:
            # Service Provider Appointment Requesting Supplier 
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B012'
        B013:
            # CSS Switch ID              
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B013'

        B070:
            # Proposed Metering Service Details (Mandatory for Event [MSAppSPRepsonse])                  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B070'

        B071:
            # Proposed Data Service Details (Mandatory for Event [DSAppSPRepsonse])                  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B071'

        B018:
            # Proposed Data Service Details (Mandatory for Event [SDS-MDRUpdate])                  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B018'

# IF 035 - Supplier Service Provider Appointment Request Response
    IF-035-Payload:
      description: IF-035 Supplier Service Provider Appointment Request Response
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-035-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-035-CustomBlock'

    IF-035-CommonBlock:
      description: MHHS Common Block for IF-035
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-035']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[MSAppAccepted]'
                - '[MSAppRejected]'
                - '[MSAppLapsed]'
                - '[DSAppAccepted]'
                - '[DSAppRejected]'
                - '[DSAppLapsed]'
                - '[IMS-SendMTD]'
                - '[SDS-MDROutcome]'
                - '[DCC-MDROutcome]' # added 16/12/2022
          required:
            - interfaceID
            - schemaVersion
            - eventCode

        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
#        R0:
#          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-035-CustomBlock:
      description: IF035 Custom data block
      type: object
      required:
        - B066  #DIN-364
      properties:
        B007:
            # Service Provider Appointment Outcome                
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B007'
        B012:
            # Service Provider Appointment Requesting Supplier 
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B012'

        B013:
            # CSS Switch ID              
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B013'

        B070:
            # Proposed Metering Service Details                   
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B070'

        B071:
            # Proposed Data Service Details                   
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B071'

        B019:
            # Assigned MDR 
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B019'

        B066:
            # DCC MDR Outcome 
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B066'

        B092:
            # SDS MDR Outcome 
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B092'
            

# IF036 

# IF 036 - Service Provider Notification of Appointment

    IF-036-Payload:
      description: IF-036 Service Provider Notification of Appointment
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-036-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-036-CustomBlock'

    IF-036-CommonBlock:
      description: MHHS Common Block for IF-036
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-036']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[MSAppActive]'
                - '[DSAppActive]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode


        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
#        R0:
#          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-036-CustomBlock:
      description: IF036 Custom data block
      type: object
      properties:
        B012:
            # Service Provider Appointment Requesting Supplier 
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B012'

        B013:
            # CSS Switch ID              
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B013'

        B014: 
        # Metering Service Details (Mandatory for Event [MSAppActive])
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B014'
        
        B015: 
        # Data Service details
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B015'
        B019: 
        # Assigne MDR
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B019'                    
        B005: 
        # Incumbent Service Providers                   
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B005'
        B016: 
        # Partner MS Info                  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B016'
        B017: 
        # Partner Data Service Info
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B017'
        B022: 
        # MPAN Address
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B022'
        B023: 
        # MPAN Connection Info
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B023'
        B024: 
        # MPAN DUOS tarriff Id
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B024'
        B025: 
        #  MPAN Energisation Status (Mandatory)                    
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B025'
        B026: 
        #  MPAN Market Segment (Mandatory for [ChangeOfSupplier])                    
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B026'

        B027: 
        #  Assumed Annual Consumption
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B027'

        B028: 
        #  Domestic Premise Indicator
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B028'

        B068: 
        #  MPAN Consent info
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B068'

        B029: 
        #  MPAN Smart Info (Conditionally Mandatory - Required only for Smart Meters)                    
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B029'

        B030: 
        #  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B030'
            
        B031: 
        #  SMSO Info (Optional)                                        
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B031'

        B032: 
        #  MPAN Legacy Info (Optional - Populated only for Traditional Meters)                    
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B032'  

        B905List:
          type : array
          items: 
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B905'
            
        B035List:
          type : array
          items: 
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B035'      

        B037List:
          type : array
          items: 
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B037'


# IF 037 - Service Provider Notification of Appointment
# 25/8/22 - done

    IF-037-Payload:
      description: IF-037 Service Provider Notification of Appointment
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-037-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-037-CustomBlock'

    IF-037-CommonBlock:
      description: MHHS Common Block for IF-037
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-037']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[MSDeApp]'
                - '[DSDeApp]'
                - '[MSDeAppUpdate]'
                - '[DSDeAppUpdate]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode


        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
#        R0:
#          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-037-CustomBlock:
      description: IF037 Custom data block
      type: object
      properties:
        B013:
            # CSS Switch ID              
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B013'

        B008:
            # Metering Service De-Appointment Details  (Mandatory for [MSDeApp])                
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B008'

        B009:
            # Data Service De-Appointment Details  (Mandatory for [DSDeApp])                  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B009'
            
        B010:
            # Incoming Metering Service Details 
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B010'

        B011:
            # Incoming Data Service  Details  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B011'


# IF 038 - Customer Direct Contract Advisory
# 25/8/22 - done

    IF-038-Payload:
      description: IF-038 Customer Direct Contract Advisory
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-038-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-038-CustomBlock'

    IF-038-CommonBlock:
      description: MHHS Common Block for IF-038
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-038']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[DirectContractMSAdd]'
                - '[DirectContractDSAdd]'
                - '[DirectContractMSRemove]'
                - '[DirectContractDSRemove]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode


        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
#        R0:
#          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-038-CustomBlock:
      description: IF038 Custom data block
      type: object
      properties:
        B020:
            #  Customer Direct Contract MS Info ~ Mandatory for event [DirectContractMSAdd]                
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B020'

        B021:
            #  Customer Direct Contract DS Info ~ Mandatory for event [DirectContractDSAdd]                
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B021'

# INF 039 - Customer Direct Contract Advisory Response
# 25/8/22 - done

    IF-039-Payload:
      description: IF039 Customer Direct Contract Advisory Response
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-039-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-039-CustomBlock'

    IF-039-CommonBlock:
      description: MHHS Common Block for IF-039
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-039']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[DirectContractMSAdd]'
                - '[DirectContractDSAdd]'
                - '[DirectContractMSRemove]'
                - '[DirectContractDSRemove]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode
                
        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
        R0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-039-CustomBlock:
      description: IF039 Custom data block
      type: object
      properties:

        B020:
            #  Customer Direct Contract MS Info ~ Mandatory for event [DirectContractMSAdd]                
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B020'

        B021:
            #  Customer Direct Contract DS Info ~ Mandatory for event [DirectContractDSAdd]                
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B021'
            
# IF 040 - Notification of ECS Calculated Consumption 
# 25/8/22 - done

    IF-040-Payload:
      description: IF040 Notification of ECS Calculated Consumption 
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-040-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-040-CustomBlock'

    IF-040-CommonBlock:
      description: MHHS Common Block for IF-040
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-040']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[AnnualConsumption]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode
              
        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
#        R0:
#          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-040-CustomBlock:
      description: IF040 Custom data block
      type: object
      properties:

        B059:
            #  Annual consumption mandatory                
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B059'
            
# IF 041 - Cumulative Register Reading
  
    IF-041-Payload:
      description: IF041 Smart/Advanced Readings
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-041-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-041-CustomBlock'

    IF-041-CommonBlock:
      description: MHHS Common Block for IF-041
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-041']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                  - '[ReadingRemote]'
                  - '[ReadingRemv]'
                  - '[ReadingInstl]'
                  - '[ReadingEnergisationChg]'
                  - '[ReadingCOR]'
                  - '[ReadingOnSite]'
                  - '[ReadingCOS]' 
                  - '[DSEstimate]'
                  - '[SupplierAgreedCOS]'
                  - '[ReadingOverride]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode
                
        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
#        R0:
#          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-041-CustomBlock:
      description: IF041 Custom data block
      type: object
      properties:

      #properties:  # DIN-447 - Updated to be either OR
      # B064 or B065 block

        B06465list:
          anyOf:
            #B064List
            - type: array
              items:
                #  Conditionally Mandatory
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B064'
              
            #B065List
            - type: array 
              items:
                #  Smart Meter Configurable Register Readings (Optional)
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B065'
              maxItems: 48


      # V1.2 SPEC 
      # B064List:
      #    type: array
      #    items:
            #  Conditionally Mandatory
      #      $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B064'
          
      #  B065List:
      #    type: array
      #    items:
      #      #  Smart Meter Configurable Register Readings (Optional)
      #      $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B065'
      #    maxItems: 48



# IF 043 - Registration Service Notification of Change in Connection Type
# 25/8/22 ok

    IF-043-Payload:
      description: IF-043 Registration Service Notification of Change in Connection Type
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-043-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-043-CustomBlock'

    IF-043-CommonBlock:
      description: MHHS Common Block for IF-043
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-043']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                - '[ConnectionTypeChange]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode

        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
#        R0:
#          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-043-CustomBlock:
      description: IF043 Custom data block
      type: object
      properties:
        B023:
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B023'



# IF 044 - Registration Service Notification of Change in Market Segment

    IF-044-Payload:
      description: IF044 Registration Service Notification of Change in Market Segment
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-044-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-044-CustomBlock'

    IF-044-CommonBlock:
      description: MHHS Common Block for IF-044
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-044']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                  - '[MarketSegmentChange]'               
          required:
            - interfaceID
            - schemaVersion
            - eventCode
        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
#        R0:
#          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-044-CustomBlock:
      description: IF044 Custom data block
      type: object
      properties:
        B026:
            #  MPAN Market Segment 
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B026'

        B023:
            #    MPAN Connection Type (Mandatory)            
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B023'
            
# IF 045 - Registration Service Reminder Notification

    IF-045-Payload:
      description: IF045 Registration Service Reminder Notification

      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-045-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-045-CustomBlock'

    IF-045-CommonBlock:
      description: MHHS Common Block for IF-045
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-045']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                  - '[InvalidMarketSegment]'
                  - '[ConsentGranularityInvalid]'
                  - '[NoMSAppointed]'
                  - '[NoDSAppointed]'                
          required:
            - interfaceID
            - schemaVersion
            - eventCode
        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
#        R0:
#          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-045-CustomBlock:
      description: IF045 Custom data block
      type: object
      properties:

        B060:
            #    Registration reminder additonal information            
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B060'
            
            
# IF 047 - Notification of the Publication of a Downloadable Asset

    IF-047-Payload:
      description: IF047 Notification of the Publication of a Downloadable Asset
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-047-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-047-CustomBlock'

    IF-047-CommonBlock:
      description: MHHS Common Block for IF-047
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-047']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                  - '[ISD]'               
          required:
            - interfaceID
            - schemaVersion
            - eventCode
        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
#        R0:
#          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-047-CustomBlock:
      description: IF047 Custom data block
      type: object
      properties:
        P01:
            #    Publication variant             
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/P01'
        P02List:
            type: array
            items:    
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/P02'

# New 18/11/2022
# IF 050 - EES Exclusive Updates

    IF-050-Payload:
      description: IF050 EES Exclusive Updates
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/IF-050-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/IF-050-CustomBlock'

    IF-050-CommonBlock:
      description: MHHS Common Block for IF-050
      type: object
      required: 
        - S0
        - S1
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            interfaceID: 
              type: string
              enum: ['IF-050']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum :
                - '008'
            eventCode: 
              type: string
              enum: 
                  - '[MPANCreation]'
                  - '[MPStatusChange]'
                  - '[GreenDeal]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode
               
        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'
        M0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/M0'
#        R0:
#          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R0'
        
    IF-050-CustomBlock:
      description: IF050 Custom data block
      type: object
      properties:
        B001:
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B001'
        B022:
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B022'
        B023:
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B023'

#        B077:
#            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B077'
#        B078:
#            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B078'

        B024:
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B024'
        B025:
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B025'
        B026:
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B026'
#
# removed 13/04/23
#       B035List:
#          type: array
#          items:
#            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B035'
#        B037List:
#          type: array
#          items:
#            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B037'
        B079:
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B079'
        B080:
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/B080'
            
            
        

                
# REP002 - LDSO report for DUoS – aggregated data


    REP-002-Payload:
      description: LDSO or Supplier report for DUoS – aggregated data
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/REP-002-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/REP-002-CustomBlock'

    REP-002-CommonBlock:
      description: MHHS Common Block for REP002
      type: object
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            reportId: 
              type: string
              enum: ['REP-002']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '005'
              enum: 
                - '005'
            eventCode: 
              type: string
              enum: 
                  - '[DUoSLDSOAggData]'
                  - '[DUOSSupplierAggData]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode

        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'

      required:
        - S0
        - S1

    REP-002-CustomBlock:
      description: REP002 Custom data block
      type: object
      properties:
        R027:
            #    Distributor ID 
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R027'
        R013:
            #    GSP Group  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R013'
        R007:
            #    Settlement Run Execution  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R007'
        R002:
            #    Settlement Run Execution  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R002'
        R009List:
          description: array of suppliers
          type: array
          items:
              $ref:  'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R9009'
          
# REP002A - Embedded Network report for DUoS – aggregated data

    REP-002A-Payload:
      description: Embedded Network report for DUoS – aggregated data
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/REP-002A-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/REP-002A-CustomBlock'

    REP-002A-CommonBlock:
      description: MHHS Common Block for REP002A
      type: object
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            reportId: 
              type: string
              enum: ['REP-002A']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '005'
              enum: 
                - '005'
            eventCode: 
              type: string
              enum: 
                  - '[DUoSEmbeddedLDSOAggData]'
          required:
            - interfaceID
            - schemaVersion
            - eventCode
               
        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'

      required:
        - S0
        - S1

    REP-002A-CustomBlock:
      description: REP002A Custom data block
      type: object
      properties:
        R027:
            #    Distributor ID 
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R027'
        R013:
            #    GSP Group  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R013'
        R007:
            #    Settlement Run Execution  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R007'
        R002:
            #    Settlement Run Execution  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R002'
        R006List:
          description: array of Embedded LDSOs
          type: array
          items:
              $ref:  'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R9006'
              
# REP003 - BM Unit Allocated Demand Volumes to Suppliers

    REP-003-Payload:
      description: BM Unit Allocated Demand Volumes to Suppliers
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/REP-003-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/REP-003-CustomBlock'

    REP-003-CommonBlock:
      description: MHHS Common Block for REP003
      type: object
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            reportId: 
              type: string
              enum: ['REP-003']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '005'
              enum: 
                - '005'
            eventCode: 
              type: string
              enum: 
                  - '[BMUnitAllocatedDemandVolumesToMarketParticipants]'

        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'

      required:
        - S0
        - S1

    REP-003-CustomBlock:
      description: REP003 Custom data block
      type: object
      properties:
        R013:
            #    GSP Group  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R013'
        R007:
            #    Settlement Run Execution  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R007'
        R002:
            #    Settlement Run Execution  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R002'
        R103:
            #    Settlement Period Duration  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R103'
 
        R015List:
          description : Supplier(s)
          type: array
          items:
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R9015'

        R024List: 
          description: GSP Group correction factors
          type: array
          items:
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R024'
          


# REP004 - Supplier Deemed Take Report

    REP-004-Payload:
      description: Supplier Deemed Take Report
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/REP-004-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/REP-004-CustomBlock'

    REP-004-CommonBlock:
      description: MHHS Common Block for REP004
      type: object
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            reportId: 
              type: string
              enum: ['REP-004']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '005'
              enum: 
                - '005'
            eventCode: 
              type: string
              enum: 
                  - '[SuplierDemandTakeReport]'
        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'

      required:
        - S0
        - S1

    REP-004-CustomBlock:
      description: REP004 Custom data block
      type: object
      properties:
        R013:
            #    GSP Group  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R013'
        R007:
            #    Settlement Run Execution  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R007'
        R002:
            #    Settlement Run Info 
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R002'
        R009:
            #    Supplier  ID
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R009'
        R026List:
          type: array
          items:
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R026'
        R025List: 
          type: array
          items:
            #   Daily Supplier Deemed Take
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R025'
            

# REP006 - Aggregated Uncorrected volumes by CCC to Market Participants

    REP-006-Payload:
      description: Aggregated Uncorrected volumes by CCC to Market Participants
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/REP-006-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/REP-006-CustomBlock'

    REP-006-CommonBlock:
      description: MHHS Common Block for REP006
      type: object
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            reportId: 
              type: string
              enum: ['REP-006']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '008'
              enum: 
                - '008'
            eventCode: 
              type: string
              enum: 
                  - '[UncorrectedConsumptionAndLossesByCCCID]'
        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'

      required:
        - S0
        - S1

    REP-006-CustomBlock:
      description: REP006 Custom data block
      type: object
      properties:
        R013:
            #    GSP Group  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R013'
        R007:
            #    Settlement Run Execution  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R007'
        R002:
            #    Settlement Run Execution  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R002'
        R032List:
          description: Array of extended BM Unit records 
          type: array
          items:
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R9032'


# REP007 - VAS Exception Report to Suppliers

    REP-007-Payload:
      description: VAS Exception Report to Suppliers
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/REP-007-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/REP-007-CustomBlock'

    REP-007-CommonBlock:
      description: MHHS Common Block for REP007
      type: object
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            reportId: 
              type: string
              enum: ['REP-007']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '005'
              enum: 
                - '005'
            eventCode: 
              type: string
              enum: 
                  - '[BMUnitDefaultsToSuppliers]'
               
        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'

      required:
        - S0
        - S1

    REP-007-CustomBlock:
      description: REP007 Custom data block
      type: object
      properties:
        R002:
            #    Settlement Run Execution  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R002'
        R013List:
          type: array
          items:
            #    GSP Group ext  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R9013'



# REP008 -  MDS Exception Report to LDSOs

    REP-008-Payload:
      description:  MDS Exception Report to LDSOs 
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/REP-008-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/REP-008-CustomBlock'

    REP-008-CommonBlock:
      description: MHHS Common Block for REP008
      type: object
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            reportId: 
              type: string
              enum: ['REP-008']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '005'
              enum: 
                - '005'
            eventCode: 
              type: string
              enum: 
                  - '[LDSOLLFDefaultData]'
               
        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'

      required:
        - S0
        - S1
         
    REP-008-CustomBlock:
      description: REP008 Custom data block
      type: object
      properties:
        R002:
            #    Settlement Run Execution  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R002'
        R013:
            #    GSP Group  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R013'
        R027:
            # Distributor ID
            $ref:  'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R027'
        R039:
            # LLF Default Data Detail
            $ref:  'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R039'


         
# REP009 Half Hourly metered data for Suppliers that is used by the CM Settlement Services Provider in calculating CM data, and/ or by the CFD Settlement Services provider in calculating CFD data.

    REP-009-Payload:
      description:  EMRS Report for Suppliers
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/REP-009-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/REP-009-CustomBlock'

    REP-009-CommonBlock:
      description: MHHS Common Block for REP009
      type: object
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            reportId: 
              type: string
              enum: ['REP-009']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '005'
              enum: 
                - '005'
            eventCode: 
              type: string
              enum: 
                  - '[EMRSReportForSuppliers]'
               
        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'

      required:
        - S0
        - S1

    REP-009-CustomBlock:
      description: REP009 Custom data block
      type: object
      properties:
        R002:
            #    Settlement Run Execution  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R002'
        R9015a:
            # Supplier ID
            $ref:  'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R9015a'
            
# REP900 

    REP-900-Payload:
      description:  LDSO E-Bill - Distribution Invoice
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/REP-900-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/REP-900-CustomBlock'

    REP-900-CommonBlock:
      description: MHHS Common Block for REP900
      type: object
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            reportId: 
              type: string
              enum: ['REP-900']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '005'
              enum: 
                - '005'
            eventCode: 
              type: string
              enum: 
                  - '[????]'
               
        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'

      required:
        - S0
        - S1

    REP-900-CustomBlock:
      description: REP900 Custom data block
      type: object
      properties:
        R900-01:
            # LDSO Billing Distributor Info   
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R900-01'
        R900-02:
            #   LDSO Billing Supplier Info  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R900-02'
        R900-03:
            #  LDSO Billing Site Info
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R900-03'
        R900-04:
            #  Invoice Data  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R900-04'
        B900-05List:
          description: Invoice Lines
          type : array
          items: 
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R900-05'
            
# REP901 

    REP-901-Payload:
      description:  LDSO E-Bill - Distribution Invoice
      type: object
      properties:
        CommonBlock:
          $ref: '#/components/schemas/REP-901-CommonBlock'
        CustomBlock:
          $ref: '#/components/schemas/REP-901-CustomBlock'

    REP-901-CommonBlock:
      description: MHHS Common Block for REP901
      type: object
      properties:
        S0:
          description: Sender Header block
          type: object
          properties:
            reportId: 
              type: string
              enum: ['REP-901']
            schemaVersion:
              description: Version of the message schema used in the exchange
              type: string
              example: '005'
              enum: 
                - '005'
            eventCode: 
              type: string
              enum: 
                  - '[????]'
               
        S1:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/S1'
        A0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/A0'
        D0:
          $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/D0'

      required:
        - S0
        - S1

    REP-901-CustomBlock:
      description: REP901 Custom data block
      type: object
      properties:
        R901-01:
            # DIS/GSP    
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R901-01'
        R901-02:
            #   Settlement Run  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R901-02'

        R901-03:
            #   Supplier Id  
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R901-03'
            
        R901-04:
            #   Settlement Date
            $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.4#/components/schemas/R901-04'